﻿using System;
using System.Collections.Generic;

namespace WindowsPhone.CompactContainer.Aggregator
{
    public interface IEventPublisher
    {
        void OnHandlerError(Action<Exception> errorHandler);

        void Publish<T>(T eventData);

        EventHandlerOptions RegisterHandler<T>(IEventHandler<T> eventHandler);

        IList<EventHandlerOptions> RegisterHandlers(object eventHandler);

        void UnregisterHandler(object eventHandler);
    }
}
